package com.market.plus.core.mapping;

import org.springframework.stereotype.Component;

import com.googlecode.simpleobjectassembler.converter.AbstractObjectConverter;
import com.market.plus.core.domain.LockStatus;


@Component
public class LockstatusToIntegerConvert extends AbstractObjectConverter<LockStatus, Integer> {

   @Override
   public void convert(LockStatus sourceObject, Integer destinationObject) {
      destinationObject = Integer.valueOf(sourceObject.getFriendStatus());
   }

   @Override
   public Integer createDestinationObject(LockStatus destinationObject) {
      return Integer.valueOf(destinationObject.getFriendStatus());
   }

   @Override
   protected boolean disableAutoMapping() {
      return true;
   }
}
